<template>
  <div class="remit-record">
    <div class="header-breadcrumb">
      <Breadcrumb :headerTitle="headerTitle" />
    </div>
    <div class="remit-record-title">汇出记录</div>
    <div class="line-between"></div>
    <div class="remit-record-search">
      <div class="remit-record-search-inout">
        <el-input
          placeholder="搜索模板名称"
          suffix-icon="el-icon-search"
          v-model="keyWordName"
        >
        </el-input>
      </div>
      <div class="remit-record-search-inout">
        <span>账号: </span>
        <el-select v-model="siteValue" clearable placeholder="请设置站点">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="remit-record-search-inout">
        <span>店铺: </span>
        <el-select v-model="siteValue" clearable placeholder="请选择状态">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="remit-record-search-inout">
        <span>状态: </span>
        <el-select v-model="siteValue" clearable placeholder="请选择状态">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
      <div class="remit-record-search-submit">
        <el-button size="medium" type="primary">搜索</el-button>
      </div>
    </div>
    <!-- 数据列表 -->
    <div class="remit-record-table">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="date" label="编号" width="100">
        </el-table-column>
        <el-table-column prop="address" label="模板名称" width="180">
        </el-table-column>
        <el-table-column prop="name" label="汇出数" width="120">
        </el-table-column>
        <el-table-column prop="name" label="条形码类型" width="100">
        </el-table-column>
        <el-table-column prop="name" label="所属店铺" width="180">
        </el-table-column>
        <el-table-column label="状态" width="120">
          <template>
            <span>汇出成功</span>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="汇出时间" width="140">
        </el-table-column>
        <el-table-column prop="name" label="下载次数" width="100">
        </el-table-column>
        <el-table-column prop="name" label="上次下载时间" width="180">
        </el-table-column>
        <el-table-column label="操作" width="180">
          <template slot-scope="scope">
            <el-button type="text" size="small">重新汇出</el-button>
            <el-button type="text" size="small">下载excel</el-button>
            <el-button @click="handleClick(scope.row)" type="text" size="small"
              >查看</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import Breadcrumb from '@/components/breadcrumb';
import Finish from '@/api/finish';

export default {
  name: 'remitRecord',
  components: { Breadcrumb },
  props: {},
  data() {
    return {
      headerTitle: ['定制产品', '汇出记录'],
      keyWordName: '', // 搜索模板名称
      siteValue: '', // 设置站点
      options: [
        {
          value: '选项1',
          label: '黄金糕',
        },
        {
          value: '选项2',
          label: '双皮奶',
        },
        {
          value: '选项3',
          label: '蚵仔煎',
        },
      ],
      tableData: [],
    };
  },
  computed: {},
  watch: {},
  created() {
    this.getFinishRemit();
  },
  methods: {
    // 获取汇出
    getFinishRemit() {
      const params = {
        shop_id: 0,
        product_template: 0,
        pricing_template: 0,
        type: 0,
      };
      // Finish.postFinishRemit(params).then((res) => {
      //   console.log(res);
      // });
    },
  },
  mounted() {},
};
</script>

<style scoped lang="less">
.remit-record {
  .remit-record-title {
    padding-left: 24px;
    font-weight: 700;
    height: 50px;
    line-height: 50px;
  }

  .remit-record-search {
    display: flex;
    align-items: center;
    padding-top: 24px;

    .remit-record-search-inout {
      margin-right: 24px;
    }
  }
  // 数据列表
  .remit-record-table {
    padding: 24px 0 45px;

    /deep/ .el-table__cell {
      text-align: center;
    }
  }
}
</style>
